{template 'common/header'}
<ul class="nav nav-tabs">
	<li {if $operation == 'add'}class="active"{/if}><a href="{php echo $this->createWebUrl('shopping', array('op' => 'category','operation' => 'add'))}">添加分类</a></li>
	<li {if $operation == 'list'}class="active"{/if}><a href="{php echo $this->createWebUrl('shopping', array('op' => 'category','operation' => 'list'))}">管理分类</a></li>
</ul>
<div class="main">
	<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="form1">
		<div class="panel panel-default">
			<div class="panel-heading">
				商品分类
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
					<div class="col-sm-4 col-xs-6">
						<input type="text" name="displayorder" class="form-control" value="{$category['displayorder']}" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>分类名称</label>
					<div class="col-sm-4 col-xs-6">
						<input type="text" name="catename" class="form-control" value="{$category['name']}" />
					</div>
				</div>

				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">分类图片</label>
					<div class="col-sm-4 col-xs-6">
						{php echo tpl_form_field_image('thumb', $category['thumb'])}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">分类描述</label>
					<div class="col-sm-4 col-xs-6">
						<textarea name="description" class="form-control" cols="70">{$category['description']}</textarea>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">是否显示</label>
					<div class="col-sm-4 col-xs-6">
						<label class='radio-inline'>
							<input type='radio' name='enabled' value=1' {if $category['enabled']==1}checked{/if} /> 是
						</label>
						<label class='radio-inline'>
							<input type='radio' name='enabled' value=0' {if $category['enabled']==0}checked{/if} /> 否
						</label>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
					<div class="col-sm-10 col-xs-6">
						<input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
						<input type="hidden" name="token" value="{$_W['token']}" />
					</div>
				</div>
			</div>
		</div>
	</form>
</div>

{template 'common/footer'}